package demo.classs;

public class EnumClass {
	public static void main(String[] args)
	{
		int nargs = args.length;
		if(nargs < 1){
			 System.out.println("Ban phai truyen vao: thuhai, thuba, thutu, thunam, thusau, thubay, chunhat");
			 System.exit(0);
		 }else {
			 DayOfWeek dow = Enum.valueOf(DayOfWeek.class, args[0]);
			 String name = dow.getName();
			 String content = dow.getContent();
			 System.out.println(name + ": " + content);
	 }
	}
}

enum DayOfWeek{
	thuhai("Thu hai", "Di lam"), thuba("Thu ba", "Di lam"), thutu("Thu tu", "Di lam"), thunam("Thu nam", "Di lam"), thusau("Thu sau", "Di lam"), thubay("Thu bay", "Duoc nghi"), chunhat("Chu nhat", "Duoc nghi");
	private String name;
	private String content;
	private DayOfWeek(String name, String content) {
		this.name = name;
		this.content = content;
	}
	
	public String getContent()
	{
		return content;
	}
	
	public String getName()
	{
		return name;
	}
}